using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace WinformTemplete.Common
{
    public static class HttpClientManager
    {
        private static readonly HttpClient _client = new HttpClient();

        public static async Task<string> GetAsync(string url)
        {
            return await _client.GetStringAsync(url);
        }

        public static async Task<string> PostAsync(string url, HttpContent content)
        {
            var response = await _client.PostAsync(url, content);
            return await response.Content.ReadAsStringAsync();
        }
    }
} 